import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        //入队
        queue.offer(12);
        queue.offer(23);
        queue.offer(34);

        //出队头元素
        System.out.println(queue.poll());
        //获取队头元素但不删除
        System.out.println(queue.peek());
        System.out.println(queue.isEmpty());
    }
}
